<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lijch
  Date: 2021/4/16
  Time: 1:54 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>发布成功</title>
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.request.contextPath}/css/boot3/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script src="${pageContext.request.contextPath}/js/jquery-3.5.1.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js" type="text/javascript"></script>
    <style>
        body{
            background-image: url("/images/login_re_back.jpeg");
            background-size: cover;
            text-align: center;
        }
        #div1{
            width: 30%;
            height: 40%;
            margin-left: 35%;
            margin-top: 10%;
            background-color: #FFFFFF;
            text-align: center;
            border-radius: 2%;
            border: #cccccc 2px solid;
        }
    </style>
</head>
<body>
    <div id="div1" class="card-body">
        <div class="row">
            <div class="col-md-12" style="margin-top: 15%">
                <span style="color: limegreen" class="glyphicon glyphicon-ok"></span> 发布成功了
            </div>
            <div class="col-md-12" style="margin-top: 2%">
                <span style="color: red" class="glyphicon glyphicon-dashboard"></span>
                <span id="time">05</span> 秒后自动跳转书城首页
            </div>
            <div class="col-md-5" style="margin-top: 14%">
                <div class="input-group">
                    <c:set var="u" value="${sessionScope.user}"/>
                    <a href="/ubook/my/index" class="btn btn-primary">查看记录</a>
                </div>
            </div>
            <div class="col-md-2"></div>
            <div class="col-md-5" style="margin-top: 14%">
                <div class="input-group">
                    <a href="/" class="btn btn-primary">去首页</a>
                </div>
            </div>
        </div>
    </div>

    <script>
    let currCount = 5;

    $(document).ready(function(){
        window.setInterval(setTime, 1000);
    });

    function setTime(){
        if (currCount == 1){
            window.location.href="/";
        }else {
            currCount --;
            $("#time").text("0"+currCount);
        }
    }
</script>
</body>
</html>
